package com.ljfiction.book.adapter;

import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ljfiction.book.Baner.ShouCangBookBean;
import com.ljfiction.book.R;
import com.ljfiction.book.tools.ScreenUtils;

import java.util.List;

/**
 * Created by Android on 2017/11/2.
 */

public class UserCenterShoucangBookAdapter extends BaseQuickAdapter<ShouCangBookBean.DataBean.ListBean,BaseViewHolder>{
    public UserCenterShoucangBookAdapter(@LayoutRes int layoutResId, @Nullable List<ShouCangBookBean.DataBean.ListBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ShouCangBookBean.DataBean.ListBean item) {
        Glide.with(mContext).load(item.getBookImage()).override(ScreenUtils.getNum(mContext,81),ScreenUtils.getNum(mContext,108)).into((ImageView) helper.getView(R.id.userbookimage));
        helper.setText(R.id.userbookname,item.getBookName());
    }
}
